export const legendTypeList = [
  {
    name: "数据表",
    type: 1
  },
  {
    name: "柱状图",
    type: 2
  },
  {
    name: "折线图",
    type: 3
  },
  {
    name: "饼图",
    type: 4
  },
  // {
  //   name: '散点图',
  //   type: 5
  // },
  // {
  //   name: '漏斗图',
  //   type: 6
  // },
  {
    name: "地图",
    type: 7
  }
]

export const legendList = [
  {
    name: "交叉表",
    enname: "CROSS_TABLE",
    id: 1,
    widget: "PivotTable",
    icon: "crosstab",
    showAxis: [
      {
        name: "行维度",
        value: "x"
      },
      {
        name: "列维度",
        value: "y"
      },
      {
        name: "指标",
        value: "index"
      },
      {
        name: "结果过滤",
        value: "filter"
      },
    ],
    showStyle: [],
    type: 1
  },
  {
    name: "分组表",
    enname: "GROUP_TABLE",
    id: 2,
    widget: "GroupedTable",
    icon: "crosstab",
    showAxis: [
      {
        name: "维度",
        value: "x"
      },
      {
        name: "指标",
        value: "index"
      },
      {
        name: "结果过滤",
        value: "filter"
      },
    ],
    showStyle: [],
    type: 1
  },
  {
    name: "明细表",
    enname: "LIST_TABLE",
    id: 3,
    widget: "Table",
    icon: "detail-account",
    showAxis: [
      {
        name: "数据",
        value: "data"
      },
      {
        name: "结果过滤",
        value: "filter"
      },
    ],
    showStyle: [],
    type: 1
  },
  {
    name: "柱状图",
    enname: "HISTOGRAM",
    id: 4,
    widget: "Bar",
    icon: "bar",
    showAxis: [
      {
        name: "横轴",
        value: "x",
        required: true,
        max: 1
      },
      {
        name: "纵轴",
        value: "index",
        required: true
      },
      {
        name: "结果过滤",
        value: "filter"
      },
    ],
    showStyle: [ "Axis", "Grid", "Legend", "Background"],
    type: 2
  },
  // series 中的 stack 设置同一系列
  {
    name: "堆叠柱状图",
    enname: "STACKED_COLUMN_CHART",
    id: 5,
    widget: "StackBar",
    icon: "stack-bar",
    showAxis: [
      {
        name: "横轴",
        value: "x",
        required: true,
        max: 1
      },
      {
        name: "纵轴",
        value: "index",
        required: true
      },
      {
        name: "结果过滤",
        value: "filter"
      },
    ],
    showStyle: [ "Axis", "Grid", "Legend", "Background"],
    type: 2
  },
  // xAxis 中 type 等于 value,  yAxis 中 type 等于 category,
  {
    name: "条形图",
    enname: "BAR_CHART",
    id: 6,
    widget: "HorizontalBar",
    icon: "horizontal-bar",
    showAxis: [
      {
        name: "横轴",
        value: "index",
        required: true
      },
      {
        name: "纵轴",
        value: "x",
        required: true,
        max: 1
      },
      {
        name: "结果过滤",
        value: "filter"
      },
    ],
    showStyle: [ "Axis", "Grid", "Legend", "Background"],
    type: 2
  },
  {
    name: "对比柱状图",
    enname: "COMPARISON_HISTOGRAM",
    id: 7,
    widget: "Bar",
    icon: "bar",
    showAxis: [
      {
        name: "横轴",
        value: "index",
        required: true,
        max: 2
      },
      {
        name: "纵轴",
        value: "x",
        required: true,
        max: 1
      },
      {
        name: "结果过滤",
        value: "filter"
      },
    ],
    showStyle: [ "Axis", "Grid", "Legend", "Background"],
    type: 2
  },
  // series 中 type 等于 line
  {
    name: "折线图",
    enname: "LINE_CHAR",
    id: 12,
    widget: "LineChart",
    icon: "line",
    showAxis: [
      {
        name: "横轴",
        value: "x",
        required: true,
        max: 1

      },
      {
        name: "纵轴",
        value: "index",
        required: true

      },
      {
        name: "结果过滤",
        value: "filter"
      },
    ],
    showStyle: [ "Axis", "Grid", "Legend", "Background"],
    type: 3
  },
  // series-line 中 areaStyle 设置为显示
  {
    name: "面积图",
    enname: "AREA_LINE_CHAR",
    id: 13,
    widget: "AreaLine",
    icon: "area-line",
    showAxis: [
      {
        name: "横轴",
        value: "x",
        required: true,
        max: 1
      },
      {
        name: "纵轴",
        value: "index",
        required: true

      },
      {
        name: "结果过滤",
        value: "filter"
      },
    ],
    showStyle: [ "Axis", "Grid", "Legend", "Background"],
    type: 3
  },
  {
    name: "堆叠折线图",
    enname: "STACKED_LINE_CHAR",
    id: 14,
    widget: "LineChart",
    icon: "line",
    showAxis: [
      {
        name: "横轴",
        value: "x",
        required: true,
        max: 1

      },
      {
        name: "纵轴",
        value: "index",
        required: true

      },
      {
        name: "结果过滤",
        value: "filter"
      },
    ],
    showStyle: [ "Axis", "Grid", "Legend", "Background"],
    type: 3
  },
  {
    name: "堆叠面积图",
    enname: "STACKED_AREA_CHAR",
    id: 15,
    widget: "LineChart",
    icon: "line",
    showAxis: [
      {
        name: "横轴",
        value: "x",
        required: true,
        max: 1
      },
      {
        name: "纵轴",
        value: "index",
        required: true

      },
      {
        name: "结果过滤",
        value: "filter"
      },
    ],
    showStyle: [ "Axis", "Grid", "Legend", "Background"],
    type: 3
  },
  // series 中 type 等于 pie
  {
    name: "饼图",
    enname: "PIE_CHAR",
    id: 8,
    widget: "Pie",
    icon: "pie",
    showAxis: [
      {
        name: "维度",
        value: "x",
        required: true,
        max: 1

      },
      {
        name: "指标",
        value: "index",
        required: true,
        max: 1

      },
      {
        name: "结果过滤",
        value: "filter"
      },
    ],
    showStyle: [ "Grid", "Legend", "Background"],
    type: 4
  },
  // series-pie 中 设置 radius 属性,
  {
    name: "环形图",
    enname: "RING_DIAGRAM",
    id: 9,
    widget: "Doughnut",
    icon: "doughnut",
    showAxis: [
      {
        name: "维度",
        value: "x",
        required: true,
        max: 1

      },
      {
        name: "指标",
        value: "index",
        required: true,
        max: 1

      },
      {
        name: "结果过滤",
        value: "filter"
      },
    ],
    showStyle: [ "Grid", "Legend", "Background"],
    type: 4
  },
  // series-pie 中 设置 roseType 属性,
  {
    name: "玫瑰图",
    enname: "NIGHTINGALE_CHART",
    id: 10,
    widget: "Rose",
    icon: "rose",
    showAxis: [
      {
        name: "维度",
        value: "x",
        required: true,
        max: 1

      },
      {
        name: "指标",
        value: "index",
        required: true,
        max: 1

      },
      {
        name: "结果过滤",
        value: "filter"
      },
    ],
    showStyle: [ "Grid", "Legend", "Background"],
    type: 4
  },
  {
    name: "多层饼图",
    enname: "NESTED_PIES",
    id: 11,
    widget: "Pie",
    icon: "pie",
    showAxis: [
      {
        name: "维度",
        value: "x",
        required: true
      },
      {
        name: "指标",
        value: "index",
        required: true,
        max: 1

      },
      {
        name: "结果过滤",
        value: "filter"
      },
    ],
    showStyle: [ "Grid", "Legend", "Background"],
    type: 4
  },
  // {
  //   name: '组合图',
  //   id: 11,
  //   icon: 'assembly'
  // },
  // series 中 type 等于 scatter
  // {
  //   name: '散点图',
  //   id: 18,
  //   widget: 'Scatter',
  //   icon: 'scatter',
  //   showAxis: ['x', 'y', 'filter'],
  //   showStyle: [ 'Title', 'Axis', 'Legend', 'Background'],
  //   type: 5
  // },
  // series 中 type 等于 funnel
  // {
  //   name: '漏斗图',
  //   id: 19,
  //   widget: 'Funnel',
  //   icon: 'funnel',
  //   showAxis: ['x', 'y', 'filter'],
  //   showStyle: [ 'Title', 'Legend', 'Background'],
  //   type: 6
  // },
  {
    name: "地图",
    enname: "BASIC_MAP",
    id: 16,
    widget: "Map",
    icon: "map",
    showAxis: [
      {
        name: "维度",
        value: "x"
      },
      {
        name: "指标",
        value: "index"
      },
      {
        name: "结果过滤",
        value: "filter"
      },
    ],
    showStyle: [ "VisualMap", "Legend", "Background", "Geo"],
    type: 7
  },
  // {
  //   name: 'gis图',
  //   id: 17,
  //   icon: 'gis',
  //   type: 7
  // }
]

export function getWidgetOpitons () {
  return {}
}
